<?php
// preparing URL
$urlParams=explode('/',trim($this->url(),'/'));

if (Application_Model_Locale::isValidLocale($urlParams[0])) array_shift($urlParams);

if (is_numeric($urlParams[count($urlParams)-1]))
{
    array_pop($urlParams);
}
$url=implode('/',$urlParams);
?>

<?php if ($this->pageCount): ?>
<div class="pagination">
<?php echo $this->firstItemNumber; ?> - <?php echo $this->lastItemNumber; ?>
<?php echo ' ' . Zend_Registry::get('locale')->_('paginator:of') . ' ' . $this->totalItemCount; ?>
 

<?php if (isset($this->previous)): ?>
  <a href="<?php echo $this->fixUrl($url.'/'.$this->first); ?>">
    <?php echo Zend_Registry::get('locale')->_('paginator:First') ?>
  </a> |
<?php else: ?>
  <span class="disabled"><?php echo Zend_Registry::get('locale')->_('paginator:First') ?></span> |
<?php endif; ?>
 

<?php if (isset($this->previous)): ?>
  <a href="<?php echo $this->fixUrl($url.'/'.$this->previous); ?>">
    &lt; <?php echo Zend_Registry::get('locale')->_('paginator:Previous') ?>
  </a> |
<?php else: ?>
  <span class="disabled">&lt; <?php echo Zend_Registry::get('locale')->_('paginator:Previous') ?></span> |
<?php endif; ?>
 

<?php if (isset($this->next)): ?>
  <a href="<?php echo $this->fixUrl($url.'/'.$this->next); ?>">
    <?php echo Zend_Registry::get('locale')->_('paginator:Next') ?> &gt;
  </a> |
<?php else: ?>
  <span class="disabled"><?php echo Zend_Registry::get('locale')->_('paginator:Next') ?> &gt;</span> |
<?php endif; ?>


<?php if (isset($this->next)): ?>
  <a href="<?php echo $this->fixUrl($url.'/'.$this->last); ?>">
    <?php echo Zend_Registry::get('locale')->_('paginator:Last') ?>
  </a>
<?php else: ?>
  <span class="disabled"><?php echo Zend_Registry::get('locale')->_('paginator:Last') ?></span>
<?php endif; ?>

</div>
<?php endif; ?>
